<!--
 * @Author: 吴世扬 18368095041@163.com
 * @Date: 2022-10-09 15:06:52
 * @LastEditors: 吴世扬 18368095041@163.com
 * @LastEditTime: 2022-10-09 16:35:57
 * @FilePath: /vue3-datav/src/components/icons/Svg-Icon.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script lang="ts" setup>
import { computed } from 'vue';
const props = defineProps({
    prefix: {
        type: String,
        default: 'icon'
    },
    name: {
        type: String,
        required: true
    },
    color: {
        type: String,
        default: 'currentColor'
    },
    size: {
        type: String,
        default: '1em'
    }
});

const symbolId = computed(() => `#${props.prefix}-${props.name}`);
</script>

<template>
    <svg
        aria-hidden="true"
        class="svg-icon"
        :width="props.size"
        :height="props.size"
    >
        <use :xlink:href="symbolId" :fill="props.color" />
    </svg>
</template>
